package cn.bdqn.config;

import cn.bdqn.bean.utils.JWTIntercptor;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Component
public class InterceptorConfg implements WebMvcConfigurer {

    /**
     * 配置拦截的请求
     * @param registry
     */
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new JWTIntercptor()).addPathPatterns("/**");
    }
}
